<!--  -->
<template>
<div class='clockAdd-page'>
  <c-title text="打卡" :hide="false" ></c-title>
  <div class='desc-page'>
    <div class="desc-box">
      <van-field
        v-model="query.detail"
        rows="5"
        autosize
        type="textarea"
        show-word-limit
        @input="textChange"
        required
        placeholder="请输入内容描述说明"
      />
    </div>
    
    <h3>图片上传</h3>
    <div class="img-list flex">
      <bolck v-for="(val, index) in query.image_list" :key="index">
        <div class="identity-img" >
          <div class="photoshow flex" >
            <img :src="val"  />
            <span class="iconfont icon-icon_close" @click="removeImg_1(index)"></span>
          </div>
        </div>
        
      </bolck>
      <div class="identity-img" >
        
        <van-uploader   :disabled="query.image_list.length >= 10" :after-read="multipleMethod_1" multiple>
          <div class="photoshow flex-a-c flex-j-c">
            <div class="crucifix" ></div>
          </div>
        </van-uploader>
      </div>
    </div>
     <!-- 显示打卡成功 -->
    <div class="verification">
      <van-popup v-model="taskShow" round :style="{ height: '60%',width:'70%' }" @close="taskShow = false">
        <div class="verification-mian" :style="`background-image: url('${imgPath}check-in-rebate/awardSuc.png');`">
          <h3>恭喜完成任务</h3>
          <p>打卡任务已完成，快去领取奖励吧</p>
          <div class="task-on" @click="refundOn">去领取</div>
        </div>
        <div class="close" @click.stop="taskShow = false">
          <i class="iconfont icon-adsystem_icon_cancle" ></i>
        </div>
      </van-popup>
    </div>
    <div  class="account-btn"  :style="iPnoneBottomBol ? 'padding-bottom: 34px;' : ''">
      <van-button round block type="info" native-type="submit" :color="coThemeColor" @click.stop="clockForm">打卡</van-button>
    </div>
  </div>
</div>
</template>

<script>
import clockAdd_controller from "./clockAdd_controller";
export default clockAdd_controller;
</script>
<style lang="scss" scoped>
.pcStyle .clockAdd-page .account-btn {
  position: fixed;
  width: 23.4375rem;
  left:50%;
  bottom: 0;
  transform: translate(-50%, 0%);
  margin: 0 auto;
}
.verification ::v-deep .van-popup {
  background: transparent;
}


/* @import url(); 引入公共css类 */
.desc-page {
  background: #FFFFFF;
  border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
  padding:0.9375rem 0.75rem 0.75rem 0.75rem;
  margin:0.625rem 0.75rem 0 0.75rem;
  .desc-box {
    padding:0 0 0.3125rem 0;
  }
  h3{
    border-top: 0.0625rem solid #F0F0F1;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1rem;
    padding:0.9375rem 0 ;
    color: #00001C;
    text-align: left;
    position: relative;
    &::before {
      position: absolute;
      left: -8px;
      color: #ee0a24;
      font-size: 14px;
      content: '*';
    }
  }
  .img-list {
    flex-wrap: wrap;
    grid-gap: 0.625rem;
    // flex-direction: column;
    // text-align: left;
    .photoshow {
      width: 6.25rem;
      height: 6.25rem;
      background: #F8F8F8;
      border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
      img {
        width: 6.25rem;
        height: 6.25rem;
        border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
      }
      .icon-icon_close {
        // color:#A0A1A7;
        position: absolute;
        top: 0.6rem;
        right: -0.6875rem;
        transform: translate(-50%,-50%);
        z-index: 5;
        width: 1.25rem;
        height: 1.125rem;
        font-size: 0.6875rem;
        padding:0.1875rem 0.3125rem 0.3125rem 0.3125rem;
        color:#fff;
        // background-color: #A0A1A7;
        border-radius: 50%;
        background: rgba(0,0,0,0.5);
        border-radius: 0rem 0.5rem 0rem 0.5rem;
      }
    }
    .identity-img {
      position: relative;
      .crucifix {
        /* 十字架样式 */
        width: 24px ;
        height: 3px;
        background: #D6D6DC;
        border-radius: 0.625rem 0.625rem 0.625rem 0.625rem;
        position: relative;

        &::after {
          content: "";
          width: 1.5rem ;
          height: 0.1875rem;
          background: #D6D6DC;
          border-radius: 0.625rem 0.625rem 0.625rem 0.625rem;
          position: absolute;
          transform: rotate(-90deg);
          left: 0;
        }
      }
    }
  }
  .verification-mian {
    width:100%;
    box-sizing: border-box;
    padding:0 0 1.375rem 0;
    // height: 100%;
    border-radius: 15px;
    background-color: transparent;
    position: relative;
    background-repeat: no-repeat;
    background-position:  top center;
    background-size: cover;
    top:-0.125rem;
    h3 {
      font-weight: bold;
      font-size: 1.125rem;
      line-height: 1.125rem;
      padding:8.75rem 0 0.75rem 0;
      color: #4E0808;
      text-align: center;
    }
    p {
      font-size: 0.875rem;
      line-height: 0.875rem;
      padding:0 0 1.25rem 0;
      color: #4E0808;
    }
    .task-on {
      font-weight: 500;
      font-size: 0.9375rem;
      line-height: 0.9375rem;
      color: #FFFFFF;
      background: linear-gradient( 173deg, #FFA678 0%, #FC3F3F 100%);
      border-radius: 1.375rem 1.375rem 1.375rem 1.375rem;
      padding:0.8125rem 2.75rem;
      margin:0 auto;
      display: inline-block;
    }

  }
  .close {
    position: absolute;
    bottom:4.625rem;
    left:50%;
    transform: translateX(-50%);
    .iconfont {
      font-size: 2.5rem;
      color:#D6D6DC;
    }
  }
  .account-btn {
    width:100%;
    background-color: #fff;
    position: fixed;
    left:0;
    bottom:0;
    padding:0.625rem 0.75rem;
  }
}
</style>